//
//  CQAddView.m
//  HiChat
//
//  Created by wqiong on 16/1/15.
//  Copyright © 2016年 wqiong. All rights reserved.
//

#import "CQAddView.h"

@interface CQAddView ()
@property (nonatomic, retain) UIButton *buttonPhoto;
@end

@implementation CQAddView

- (void)dealloc
{
    [_buttonPhoto release];

    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubviews];
    }
    return self;
}


- (void)creatSubviews {
    
    self.buttonPhoto = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.buttonPhoto setBackgroundImage:[UIImage imageNamed:@"chatBar_colorMore_photo@2x.png"] forState:UIControlStateNormal];
    [self.buttonPhoto addTarget:self action:@selector(photoAction) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.buttonPhoto];
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.buttonPhoto.frame = CGRectMake(5, 5, 50, 50);

}
- (void)photoAction {
    [self.delegate photoDelegate];
}

@end
